/**
 * Created by lintao_alex on 2018/1/17.
 */


namespace game{
    import GProgressBar = fairygui.GProgressBar;
    import GObject = fairygui.GObject;

    export class GameGProgressBar extends GProgressBar{

        protected handleSizeChanged():void{
            let barComponent = this.getChild('bar');
            if(barComponent){
                let innerBar:GObject = barComponent['innerBar']
                if(innerBar){
                    innerBar.width = innerBar.initWidth + this.width - this.sourceWidth;
                }
            }
            barComponent = this.getChild('bar_v');
            if(barComponent){
                let innerBar:GObject = barComponent['innerBar']
                if(innerBar){
                    innerBar.height = innerBar.initHeight + this.height - this.sourceHeight;
                }
            }
            super.handleSizeChanged();
        }
    }
}